﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *  
 **/

using Peter.Common.Tree;

namespace Peter.Common
{
   /// <summary>
   /// Represents a project for peter.
   /// </summary>
   public abstract class PeterProject : EditableTreeViewItem
   {
      private string m_ProjectName;
      private string m_ProjectLocation;
      private bool m_IsCurrentProject;

      /// <summary>
      /// Initializes a new peter project.
      /// </summary>
      protected PeterProject ()
         : base (null, false)
      {
      }
      
      /// <summary>
      /// Gets or Sets if this is the current project.
      /// </summary>
      public bool IsCurrentProject
      {
         get { return this.m_IsCurrentProject; }
         set
         {
            this.m_IsCurrentProject = value;
            this.RaisePropertyChanged ("IsCurrentProject");
         }
      }
      
      /// <summary>
      /// Gets the project's name.
      /// </summary>
      public string ProjectName
      {
         get { return this.m_ProjectName; }
         protected set
         {
            this.m_ProjectName = value;
            this.RaisePropertyChanged ("ProjectName");
         }
      }

      /// <summary>
      /// Get the project's location.
      /// </summary>
      public string ProjectLocation
      {
         get { return this.m_ProjectLocation; }
         protected set
         {
            this.m_ProjectLocation = value;
            this.RaisePropertyChanged ("ProjectLocation");
         }
      }

      /// <summary>
      /// Occurs when the Peter application is closing.
      /// </summary>
      public virtual void PeterClosing () {}
   }
}
